package model

import "gorm.io/gorm"

type Product struct {
	gorm.Model
	SupplierId      int     `gorm:"type:int(10);not null;comment:'供货商Id'"`
	ProductName     string  `gorm:"type:varchar(100);not null;comment:'产品名称'"`
	ProductGrouping string  `gorm:"type:varchar(20);not null;comment:'产品分组'"`
	ProductCode     string  `gorm:"type:varchar(100);not null;comment:'产品编码'"`
	ProductModel    string  `gorm:"type:varchar(50);not null;comment:'规格型号'"`
	Unit            int     `gorm:"type:int(10);not null;comment:'单位: 1:个 2:只 3:箱 4:包'"`
	CostPrice       float64 `gorm:"type:double(10,2);not null;comment:'成本价'"`
	Price           float64 `gorm:"type:double(10,2);not null;comment:'市场价'"`
	Status          int     `gorm:"type:int(10);not null;comment:'状态: 1:上架 2:下架'"`
	Stock           int     `gorm:"type:int(10);not null;comment:'库存'"`
	Notes           string  `gorm:"type:varchar(255);not null;comment:'备注'"`
	Image           string  `gorm:"type:varchar(255);not null;comment:'图片'"`
}
